package cliVet.DAO;

import java.util.List;

import org.hibernate.Session;

import cliVet.classesBasicas.Servicos;
import cliVet.interfaces.IServicosDAO;

public class ServicosDAO implements IServicosDAO {

	private Session session;

	public void setSession(Session session) {
		this.session = session;
	}

	@Override
	public void inserirServicos(Servicos servicos) {

		this.session.save(servicos);

	}

	@Override
	public void excluirServicos(Servicos servicos) {

		this.session.delete(servicos);
	}

	@Override
	public List<?> listarServicos() {

		return this.session.createCriteria(Servicos.class).list();
	}

}
